import plotly
plotly.offline.init_notebook_mode()
import cufflinks as cf
cf.go_offline()
cf.set_config_file(theme='pearl')
from plotly.graph_objs import Bar,Layout, Figure,Data,Scattermapbox,Marker,Scatter,Box,Histogram
import pandas as pd
import numpy as np
N = 500
x = np.linspace(0, 1, N)
y = np.random.randn(N)
df = pd.DataFrame({'x': x, 'y': y})
df.head()
data = [Histogram(y=df['y'])]
plotly.offline.iplot(Figure(data=data))
df = pd.DataFrame({'a': np.random.randn(1000) + 1,
'b': np.random.randn(1000),
'c': np.random.randn(1000) - 1})
df.iplot(kind='hist')
cf.set_config_file(theme='ggplot')
df.iplot(kind='hist',colors=['orange','blue','seagreen'])
df.iplot(kind='histogram', subplots=True, shape=(3, 1),colors=['orange','blue','seagreen'])
df.iplot(kind='histogram', barmode='stack', bins=100, histnorm='probability',colors=['orange','blue','seagreen'])